﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutFaultEdit.aspx.cs" Inherits="DuJianliang.ApplicationPlatform.OutFault.OutFaultEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script defer="defer" src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <style type="text/css">
        #editTable
        {
            background-color: #000000;            
        }
        #editTable td
        {
            background-color: #ffffff;
            padding: 10px 10px 10px 10px;
        }
    </style>
        <script type="text/javascript">
            function selectItemCode() {
                var retValue = window.showModalDialog(encodeURI("SelectItemCode.aspx?OitmType=157"), "", "dialogWidth=800px;dialogHeight=600px");
                if (retValue != "" && typeof (retValue) != "undefined") {
                    var retValues = retValue.split('|');
                    document.getElementById('<%=hidItemCode.ClientID%>').value = retValues[0];
                    document.getElementById('<%=txtItemName.ClientID%>').value = retValues[1];
                    document.getElementById('<%=hidItemName.ClientID%>').value = retValues[1];
                }
            }
            function selectCardCode() {
                var retValue = window.showModalDialog(encodeURI("SelectCardCode.aspx"), "", "dialogWidth=800px;dialogHeight=600px");
                if (retValue != "" && typeof (retValue) != "undefined") {
                    var retValues = retValue.split('|');
                    document.getElementById('<%=hidCardCode.ClientID%>').value = retValues[0];
                    document.getElementById('<%=txtCardName.ClientID%>').value = retValues[1];
                    document.getElementById('<%=hidCardName.ClientID%>').value = retValues[1];
                }
            }
            
            function showPage(url, width, height) {
                window.showModalDialog(encodeURI(url), "", "dialogWidth=" + width + ";dialogHeight=" + height);
            }
    </script> 
</head>
<body style="font-size:12px">
    <form id="form1" runat="server">
    <div>
    <table id="editTable" width="800px" border="0" cellpadding="0" cellspacing="1" align="center">
      <tr>
        <td colspan="4" align="center">
            <div style="font-size:20px">外场产品排故通知单</div>
            <div style="text-align:left";>编号：<asp:Label ID="lblCode" runat="server" ></asp:Label></div>
        </td>        
      </tr>
      <tr>
        <td width="100px">信息反馈单位</td>
        <td>
            <asp:TextBox ID="txtCardName" runat="server" Width="150px" ReadOnly="True"></asp:TextBox>
            <input id="btnSelectCardCode" type="button" value="选择" onclick="selectCardCode()" runat="server"/>
            <asp:HiddenField ID="hidCardCode" runat="server" />
            <asp:HiddenField ID="hidCardName" runat="server" />
        </td>
        <td width="100px">反馈形式</td>
        <td><asp:TextBox ID="txtFeedback" runat="server" Width="150px"></asp:TextBox></td>
      </tr>
      <tr>
        <td>产品型号名称</td>
        <td>
            <asp:TextBox ID="txtItemName" runat="server" Width="150px" ReadOnly="True"></asp:TextBox>
            <input id="btnSelectItemCode" type="button" value="选择" onclick="selectItemCode()" runat="server"/>
            <asp:HiddenField ID="hidItemCode" runat="server" />
            <asp:HiddenField ID="hidItemName" runat="server" />
        </td>
        <td>生产单位</td>
        <td><asp:TextBox ID="txtProductionUnit" runat="server" Width="150px"></asp:TextBox></td>
      </tr>
      <tr>
        <td>排故单位</td>
        <td>
            <asp:TextBox ID="txtOutFaultUnit" runat="server" Width="150px"></asp:TextBox>
        </td>
        <td>拍故地点</td>
        <td><asp:TextBox ID="txtOutFaultPlace" runat="server" Width="150px"></asp:TextBox></td>
      </tr>
      <tr>
        <td>排故人数</td>
        <td>
            <asp:TextBox ID="txtOutFaultNumber" runat="server" Width="150px"></asp:TextBox>
        </td>
        <td>出发时间</td>
        <td><asp:TextBox ID="txtDepartureTime" runat="server" Width="150px" onClick="WdatePicker()"></asp:TextBox></td>
      </tr>
      <tr>
        <td colspan="4" align="right">
            <asp:Button ID="btnOK" runat="server" Text="确定" onclick="btnOK_Click" />
            <asp:Button ID="btnReturn" runat="server" Text="返回" onclick="btnReturn_Click" />
            <asp:Button ID="btnAdd" runat="server" Text="选择配件" onclick="btnAdd_Click" />
        </td>
      </tr>
      <tr>
        <td colspan="4" align="center">排故用备件和配件清单</td>
      </tr>
      <tr>
        <td colspan="4" align="right">            
            <asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" Font-Size="9pt" ForeColor="#333333" GridLines="Both"
                Width="100%"  DataKeyNames="ItemCode,ItemName,ItemCount" 
                onrowcommand="gridView_RowCommand">                                   
                <Columns>
                    <asp:BoundField HeaderText="名称" DataField="ItemCode"  />
                    <asp:BoundField HeaderText="型号" DataField="ItemName"  />
                    <asp:BoundField HeaderText="数量" DataField="ItemCount"  />
                    <asp:TemplateField HeaderText="操作" ItemStyle-Width="50px">
                        <ItemTemplate>
                            <asp:Button ID="btnDelete" runat="server" Text="删除" OnClientClick="return confirm('您确定要删除该记录吗？');" CommandName="del"  CommandArgument='<%# Eval("ID") %>' Height="18px"></asp:Button>                           
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#DFE8F6" Font-Bold="True" ForeColor="#333333" Height="20px" />    
                <RowStyle BackColor="#FAFAFA" ForeColor="#333333" HorizontalAlign="Center"/>
                <EmptyDataTemplate>
                    <div style="text-align:center; margin-top:20px; margin-bottom:20px;">当前没有任何数据</div>        
                </EmptyDataTemplate>
        </asp:GridView>
        </td>
      </tr>
    </table>
    </div>
    </form>
</body>
</html>
